//操作简化
function ControlManager(position){
	var area = null;
	var x=0;
	var y=0;
	if(_GDWindow == "状态栏"){
		return new CMReturnMessage("退出状态栏",0,0,0,0);
	}
	if(_GDNowMenu == "选单"){
		if(position.x>350&&position.x<550&&position.y<340&&position.y>140){
			area = "选单";
			x=parseInt((position.x-350)/100);
			y=parseInt(2-((position.y-140)/100));
			return new CMReturnMessage(area,x,y,position.x,position.y);
		}
		else if(position.x>100&&position.x<245&&position.y<325&&position.y>180){
			return new CMReturnMessage("状态栏",0,0,0,0);
		}
		else {
			area = "退出选单";
			return new CMReturnMessage(area,x,y,position.x,position.y);
		}
	}
	if(position.x>50&&position.x<600&&position.y>410&&position.y<900){
		area = "board";
		x=parseInt((position.x-50)/92);
		y=parseInt(5-((position.y-410)/100));
	}
	else if(position.x>350&&position.x<550&&position.y<340&&position.y>40){
		area = "skill";
		x=parseInt((position.x-350)/100);
		y=parseInt(3-((position.y-40)/100));
	}
	else if(position.x>100&&position.x<245&&position.y<325&&position.y>180){
		return new CMReturnMessage("状态栏",0,0,0,0);
	}
	else
		area = "other";
	return new CMReturnMessage(area,x,y,position.x,position.y);
};

function CMReturnMessage(area, x, y,locationX,locationY){
	this.area=area;
	this.x=x;
	this.y=y;
	this.locationX=locationX;
	this.locationY=locationY;
};